package com.gnerv.pabu.basic.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gnerv.pabu.basic.core.entity.Notice;
import com.gnerv.pabu.basic.core.dto.NoticeDTO;
import com.gnerv.pabu.basic.core.dto.NoticeSearchDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * <p>
 * 基础平台-权限表 Mapper 接口
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-10-10
 */
@Mapper
public interface NoticeMapper extends BaseMapper<Notice> {

    int updateNoticeStatus(@Param("noticeId") String noticeId, @Param("status") Integer status, @Param("releaseTime") LocalDateTime releaseTime);

    Page<NoticeDTO> listNotice(@Param(value = "page") Page<NoticeDTO> page, @Param("search") NoticeSearchDTO search);

    NoticeDTO selectByNoticeId(@Param(value = "noticeId") String noticeId);
}
